<!-- 集团审核表 -->
<template>
  <div class="fcontainer">
    <el-table
      :data="tableData"
      :show-header="false"
      :span-method="objectSpanMethod"
      border
      :row-class-name="getRowClassName"
      :cell-style="{ borderColor: '#bbb' }"
      :header-cell-style="{ borderColor: '#bbb' }"
      style="width: 80%; --el-table-border-color: #bbb"
    >
      <el-table-column
        class-name="one-index"
        prop="oneIndex"
        label=""
        align="center"
      />
      <el-table-column
        class-name="two-index"
        prop="twoIndex"
        label=""
        align="center"
      />
      <el-table-column
        class-name="three-index"
        prop="threeIndex"
        label=""
        align="center"
      />
      <el-table-column
        class-name="four-index"
        prop="fourIndex"
        label=""
        align="center"
      />
      <el-table-column
        class-name="five-index"
        prop="fiveIndex"
        label=""
        align="center"
      />
      <el-table-column
        class-name="six-index"
        prop="sixIndex"
        label=""
        align="center"
      />
    </el-table>
  </div>
</template>
<script setup name="sureTemplate">
const getRowClassName = ({ row, rowIndex }) => {
  // 这里可以访问到行数据 row 和行索引 rowIndex
  if (rowIndex === 0 || rowIndex === 5) {
    return "add-background";
  }
  if (rowIndex > 5 && rowIndex < 14) {
    return "left-align delete-background";
  }
  if (rowIndex > 0) {
    return "delete-background";
  }
  return "";
};
const tableData = ref([
  {
    oneIndex: "初审意见表",
    twoIndex: "",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "",
    sixIndex: "",
  },
  {
    oneIndex: "委托单位",
    twoIndex: "北京能源投资(集团)有限公司",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "产权持有单位",
    sixIndex: "北京能源投资(集团)有限公司",
  },
  {
    oneIndex: "评估目的",
    twoIndex: "进场交易",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "评估对象",
    sixIndex: "嘉亿(北京)股权投资基金管理有限公司股东",
  },
  {
    oneIndex: "评估基准日",
    twoIndex: "2014-12-31",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "评估方法",
    sixIndex: "成本法",
  },
  {
    oneIndex: "评估机构",
    twoIndex: "中资资产评估有限公司",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "评估值(万元)",
    sixIndex: "9,967. 1563",
  },
  {
    oneIndex: "审核情况",
    twoIndex: "审核内容",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "审查情况",
    sixIndex: "",
  },
  {
    oneIndex: "",
    twoIndex: "1.评估备案/核准表填写是否规范，符合要求;	",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "√",
    sixIndex: "",
  },
  {
    oneIndex: "",
    twoIndex: "2.评估备案/核准表数据与报告书数据是否一致;	",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "√",
    sixIndex: "",
  },
  {
    oneIndex: "",
    twoIndex: "3.评估报告是否在有效期内;",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "√",
    sixIndex: "",
  },
  {
    oneIndex: "",
    twoIndex: "4.评估项目经济行为批准文件是否齐全;",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "√",
    sixIndex: "",
  },
  {
    oneIndex: "",
    twoIndex: "5.评估报告是否完整、齐全、格式是否符合规定，是否有电子版报告;",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "√",
    sixIndex: "",
  },
  {
    oneIndex: "",
    twoIndex: "6.评估机构和注册资产评估师是否具备法定资格;",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "√",
    sixIndex: "",
  },
  {
    oneIndex: "",
    twoIndex: "7.评估报告中是否有企业、评估机构承诺函，业务约定合同;",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "√",
    sixIndex: "",
  },
  {
    oneIndex: "",
    twoIndex: "8.签章是否齐全;",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "√",
    sixIndex: "",
  },
  {
    oneIndex: "",
    twoIndex: "其他",
    threeIndex: "",
    fourIndex: "",
    fiveIndex: "",
    sixIndex: "",
  },
  {
    oneIndex: "",
    twoIndex: "审核意见",
    threeIndex:
      "根据《北京市企业国有资产管理评估暂行办法》及《北京市企业国有资产评估核准项目评审管理暂行规定》等文件规定，我集团对《北京能源投资》",
    fourIndex: "",
    fiveIndex: "",
    sixIndex: "",
  },
  {
    oneIndex: "",
    twoIndex: "审核人",
    threeIndex: "",
    fourIndex: "李玲",
    fiveIndex: "日期",
    sixIndex: "2015-03-09",
  },
  {
    oneIndex: "",
    twoIndex: "评估管理部门负责人意见:",
    threeIndex: "",
    fourIndex: "主管领导意见:",
    fiveIndex: "",
    sixIndex: "",
  },
  {
    oneIndex: "",
    twoIndex: "同意",
    threeIndex: "",
    fourIndex: "同意",
    fiveIndex: "",
    sixIndex: "",
  },
  {
    oneIndex: "",
    twoIndex: "盖章",
    threeIndex: "",
    fourIndex: "盖章",
    fiveIndex: "",
    sixIndex: "",
  },
]);
const objectSpanMethod = ({ rowIndex, columnIndex }) => {
  // rowIndex, // 行索引  columnIndex, // 列索引
  if (columnIndex == 0) {
    if (rowIndex === 0) {
      return {
        rowspan: 1,
        colspan: 6,
      };
    }
    if (rowIndex === 5) {
      return {
        rowspan: 15,
        colspan: 1,
      };
    }
    if (
      rowIndex === 6 ||
      rowIndex === 7 ||
      rowIndex === 8 ||
      rowIndex === 9 ||
      rowIndex === 10 ||
      rowIndex === 11 ||
      rowIndex === 12 ||
      rowIndex === 13 ||
      rowIndex === 14 ||
      rowIndex === 15 ||
      rowIndex === 16 ||
      rowIndex === 17 ||
      rowIndex === 18 ||
      rowIndex === 19
    ) {
      return {
        rowspan: 0,
        colspan: 0,
      };
    }
  } else if (columnIndex == 1) {
    if (
      rowIndex === 1 ||
      rowIndex === 2 ||
      rowIndex === 3 ||
      rowIndex === 4 ||
      rowIndex === 5 ||
      rowIndex === 6 ||
      rowIndex === 7 ||
      rowIndex === 8 ||
      rowIndex === 9 ||
      rowIndex === 10 ||
      rowIndex === 11 ||
      rowIndex === 12 ||
      rowIndex === 13
    ) {
      return {
        rowspan: 1,
        colspan: 3,
      };
    }
    if (
      rowIndex === 16 ||
      rowIndex === 17 ||
      rowIndex === 18 ||
      rowIndex === 19
    ) {
      return {
        rowspan: 1,
        colspan: 2,
      };
    }
  } else if (columnIndex == 2) {
    if (
      rowIndex === 1 ||
      rowIndex === 2 ||
      rowIndex === 3 ||
      rowIndex === 4 ||
      rowIndex === 5 ||
      rowIndex === 6 ||
      rowIndex === 7 ||
      rowIndex === 8 ||
      rowIndex === 9 ||
      rowIndex === 10 ||
      rowIndex === 11 ||
      rowIndex === 12 ||
      rowIndex === 13 ||
      rowIndex === 16 ||
      rowIndex === 17 ||
      rowIndex === 18 ||
      rowIndex === 19
    ) {
      return {
        rowspan: 0,
        colspan: 0,
      };
    }
    if (rowIndex === 14 || rowIndex === 15) {
      return {
        rowspan: 1,
        colspan: 4,
      };
    }
  } else if (columnIndex == 3) {
    if (
      rowIndex === 1 ||
      rowIndex === 2 ||
      rowIndex === 3 ||
      rowIndex === 4 ||
      rowIndex === 5 ||
      rowIndex === 6 ||
      rowIndex === 7 ||
      rowIndex === 8 ||
      rowIndex === 9 ||
      rowIndex === 10 ||
      rowIndex === 11 ||
      rowIndex === 12 ||
      rowIndex === 13
    ) {
      return {
        rowspan: 0,
        colspan: 0,
      };
    }
    if (rowIndex === 17 || rowIndex === 18 || rowIndex === 19) {
      return {
        rowspan: 1,
        colspan: 3,
      };
    }
  } else if (columnIndex == 4) {
    if (
      rowIndex === 5 ||
      rowIndex === 6 ||
      rowIndex === 7 ||
      rowIndex === 8 ||
      rowIndex === 9 ||
      rowIndex === 10 ||
      rowIndex === 11 ||
      rowIndex === 12 ||
      rowIndex === 13
    ) {
      return {
        rowspan: 1,
        colspan: 2,
      };
    }
  } else {
    return {
      rowspan: 1,
      colspan: 1,
    };
  }
};
</script>

<style scoped lang="scss">
.fcontainer {
  :deep(.el-table) {
    .add-background {
      font-weight: bold;
      background-color: #e4f6fd;
    }
    .delete-background .four-index {
      background: transparent !important;
      font-weight: normal !important;
    }
    .left-align .two-index {
      text-align: left !important;
    }
    .one-index {
      background-color: #e4f6fd;
      font-weight: bold;
    }
    .five-index {
      font-weight: bold;
    }
    .el-table__body-wrapper {
      border-color: #bbb !important; /* 例如：#f00（红色） */
    }
    .el-table__header-wrapper {
      border-color: #bbb !important; /* 例如：#f00（红色） */
    }
  }
}
</style>

